
package com.mt.api.modules.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
*
* @description /
* @author plover
* @date 2020-07-06
**/
@Data
@TableName("es_sku")
public class AppSku implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "sku码")
    private String skuCode;

    @ApiModelProperty(value = "款号id")
    private Integer cargoId;

    @ApiModelProperty(value = "货号")
    private String cargoNo;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "颜色")
    private String color;

    @ApiModelProperty(value = "尺码")
    private String size;

    @ApiModelProperty(value = "预警值")
    private Integer warnVal;

    @ApiModelProperty(value = "是否上架 0下架 1上架")
    private Integer isUp;

    @ApiModelProperty(value = "权重")
    private Integer weight;

    @ApiModelProperty(value = "批发价")
    private Integer retailPrice;

    @ApiModelProperty(value = "零售价")
    private Integer wholesalePrice;

    @ApiModelProperty(value = "是否删除 0-否 1-是")
    private Integer deleted;

    @TableField(fill = FieldFill.INSERT)
    private Integer createId;

    @TableField(fill = FieldFill.INSERT)
    private String creator;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer updateId;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updater;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    public void copy(AppSku source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}